import request from '@/utils/request'

export function getNewsList(params) {
  return request({
    url: '/api/news/pageList',
    method: 'get',
    params
  })
}

export function getMediaList(params) {
  return request({
    url: '/api/media/pageList',
    method: 'get',
    params
  })
}

export function getDownList(params) {
  return request({
    url: '/api/download/pageList',
    method: 'get',
    params
  })
}

export function getNewsDetail(params) {
  return request({
    url: '/api/news/detail',
    method: 'get',
    params
  })
}
export function delNews(params) {
  return request({
    url: '/api/news/del',
    method: 'get',
    params
  })
}

/**
 * 新增下载中心
 */
export function addNew(params) {
  return request({
    url: '/api/news/add',
    method: 'post',
    data: params
  })
}

export function editNew(params) {
  return request({
    url: '/api/news/edit',
    method: 'post',
    data: params
  })
}